<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>店铺注册</title>

    <!-- Bootstrap Core CSS -->
    <link rel="stylesheet" href="assets/css/bootstrap.min.css" th:href="@{/LoginStyle/css/bootstrap.min.css}">

    <!-- Customizable CSS -->
    <link rel="stylesheet" href="assets/css/main.css" th:href="@{/indexStyle/css/main.css}">
    <link rel="stylesheet" href="assets/css/blue.css" th:href="@{/indexStyle/css/blue.css}">
    <link rel="stylesheet" href="assets/css/owl.carousel.css" th:href="@{/indexStyle/css/owl.carousel.css}">
    <link rel="stylesheet" href="assets/css/owl.transitions.css" th:href="@{/indexStyle/css/owl.transitions.css}">
    <link rel="stylesheet" href="assets/css/animate.min.css" th:href="@{/indexStyle/css/animate.min.css}">
    <link rel="stylesheet" href="assets/css/rateit.css" th:href="@{/indexStyle/css/rateit.css}">
    <link rel="stylesheet" href="assets/css/bootstrap-select.min.css" th:href="@{/indexStyle/css/bootstrap-select.min.css}">
    <link rel="stylesheet" href="button.css" th:href="@{/indexStyle/css/button.css}">

    <!-- Icons/Glyphs -->
    <link rel="stylesheet" href="assets/css/font-awesome.css" th:href="@{/indexStyle/css/font-awesome.css}">
    <style>
        .pink {
            height: 600px;
             background-image: url(/userStyle/image/bcc4.jpg);
            /*background-image: url(assets/image/bcc4.jpg);*/
            /* background-size: 100% 100%; */
        }
        
        .bar {
            /* background-color: pink; */
            width: 100%;
            height: 60px;
            line-height: 60px;
            text-align: center;
            font-weight: 700;
            font-size: 18px;
        }
        
        .title {
            height: 60px;
            width: 250px;
            line-height: 60px;
            text-align: center;
            font-weight: 600;
            font-size: 15px;
            background-color: skyblue;
            margin-top: 15px;
        }
        
        .body-box {
            padding-left: 95px;
            margin-top: 15px;
        }
        
        .body-in {
            width: 420px;
            height: 40px;
            line-height: 40px;
            background-color: #fff;
            margin-top: 15px;
            text-align: right;
            padding-right: 5px;
        }
        
        .body-in label {
            padding-left: 5px;
            float: left;
        }
        
        .body-in input {
            width: 350px;
            height: 30px;
        }
        
        .button {
            margin-left: 320px;
            margin-top: 15px;
        }
        
        .body-in span {
            display: none;
            color: red;
        }
    </style>
</head>

<body class="cnt-home">
<header th:replace="~{user/fragment/IndexHeader:: indexHeader}"></header>
    <div class="body-content outer-top-xs">
        <div class='container'>
            <div class='row'>
                <div class="pink">
                    <div class="bar">你还没有注册店铺,来注册一个吧!</div>
                    <div class="title">店铺注册</div>
                    <div class="body-box">
                        <div class="body-in">
                            <label for="storeName">店铺名:</label>
                            <input id="storeName" type="text">
                        </div>
                        <div class="body-in">
                            <label for="studentId">学号:</label>
                            <input id="studentId" type="text">
                        </div>
                        <div class="body-in">
                            <label for="relName">真实姓名:</label>
                            <input id="relName" type="text">
                        </div>
                        <div class="body-in">
                            <label for="idCard">身份证号:</label>
                            <input id="idCard" type="text">
                        </div>
                        <div class="button">
                            <a href="#" id="submit">注册</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <!-- jQuery 3 -->
    <script src="bower_components/jquery/dist/jquery.min.js" th:src="@{/LoginStyle/js/jquery.min.js}"></script>
    <!-- Bootstrap 3.3.7 -->
    <script src="bower_components/bootstrap/dist/js/bootstrap.min.js" th:src="@{/LoginStyle/js/bootstrap.min.js}"></script>
    <script src="assets/js/bootstrap-hover-dropdown.min.js" th:src="@{/indexStyle/js/bootstrap-hover-dropdown.min.js}"></script>
    <script src="assets/js/owl.carousel.min.js" th:src="@{/indexStyle/js/owl.carousel.min.js}"></script>
    <script src="assets/js/echo.min.js" th:src="@{/indexStyle/js/echo.min.js}"></script>
    <script src="assets/js/jquery.easing-1.3.min.js" th:src="@{/indexStyle/js/jquery.easing-1.3.min.js}"></script>
    <script src="assets/js/bootstrap-slider.min.js" th:src="@{/indexStyle/js/bootstrap-slider.min.js}"></script>
    <script src="assets/js/jquery.rateit.min.js" th:src="@{/indexStyle/js/jquery.rateit.min.js}"></script>
    <script src="assets/js/lightbox.min.js" th:src="@{/indexStyle/js/lightbox.min.js}"></script>
    <script src="assets/js/bootstrap-select.min.js" th:src="@{/indexStyle/js/bootstrap-select.min.js}"></script>
    <script src="assets/js/wow.min.js" th:src="@{/indexStyle/js/wow.min.js}"></script>
    <script src="assets/js/scripts.js" th:src="@{/indexStyle/js/scripts.js}"></script>
    <script th:src="@{/indexStyle/js/indexHeader.js}"></script>
    <script>
        $(document).ready(function() {
            $("#submit").click(function() {
                var flag = true;
                var storeName = $("#storeName").val();
                if (storeName == null || storeName == "") {
                    $("#storeName").val("未填写店铺名!");
                    flag = false;
                }
                var studentId = $("#studentId").val();
                if (studentId == null || studentId == "") {
                    $("#studentId").val("未填写学号!");
                    flag = false;
                }
                var relName = $("#relName").val();
                if (relName == null || relName == "") {
                    $("#relName").val("未填写姓名!");
                    flag = false;
                }
                var idCard = $("#idCard").val();
                if (idCard == null || idCard == "") {
                    $("#idCard").val("未填写身份证号!");
                    flag = false;
                }
                if (!flag) {
                    return false;
                }
                console.log(storeName);
                $.ajax({
                    type: "post",
                    url: "/User/storeRegister/Data",
                    data: {
                        storeName: storeName,
                        studentId: studentId,
                        relName: relName,
                        idCard: idCard
                    },
                    success: function(data) {
                        console.log("注册成功？" + data);
                         window.location.href="/User/store"
                    }
                });
            });
        });
    </script>
</body>

</html>